/**
 * Space Colony is developed by Jared Hilgefort, Bunty Ranu, and Jacob Parmley
 */
package com.spacecolony.dao;


import com.spacecolony.model.*;

/**
 * @author Jared
 *
 */
public interface IGameDAO {	
	
	/**
	 * Updates the player based on the username of the player
	 * @param player - the player to be updated
	 */
	public void updatePlayer(Player player) throws Exception;
	
	/**
	 * Posts a message to facebook about the results of a game
	 * @param message - a message the player would like to include with the post
	 * @return - whether the post was successful
	 */
	public boolean postToFacebook(String message);
	
	/**
	 * Retrieves the account associated with the local device owner
	 * @return - the account and all of its details. If null must create new account
	 */
	public UserAccount loadAccount(int sqlUserId) throws Exception;
	
	/**
	 * Retrieves player with specified database id
	 * @param playerId - the id of the player in SQLite DB
	 * @return - the player object
	 * @throws Exception
	 */
	public Player loadPlayer(int playerId) throws Exception;
	
	/**
	 * Saves the account to the database
	 * @param user - the account to be saved
	 * @return 
	 * @throws Exception
	 */
	public UserAccount saveAccount(UserAccount user) throws Exception;
}
